package pojo;


import java.util.ArrayList;
import java.util.List;

public class User {

    public String name;
    public Integer age;
    public List<Student> students;



    public User() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public User(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", student=" + students +
                '}';
    }

    public static void main(String[] args) {
        User user = new User();
        //user.students = new ArrayList<>();
        //user.students.add(new Student("h"));
        fun(user.students);
        System.out.println(user);

    }

    public static void fun(List<Student> students){
        students = new ArrayList<Student>();
        students.add(new Student("m"));
    }

    public static int num = 10;
    public static void fun(){
        System.out.println("sss");
    }
}
